package com.huhu.controller;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.huhu.pojo.Article;
import com.huhu.response.Response;
import com.huhu.service.IArticleService;


/** 
 * @author 石虎虎
 *
 */

@Controller
@RequestMapping("/portal/")
public class PortalController {
	
	@Autowired
	private IArticleService iArticleService;
	
	/**
	 * 根据date更新
	 * @param date
	 * @return
	 */
	@RequestMapping(value="select.do",method=RequestMethod.GET)
	@ResponseBody
	public Response<Article> select(@Param("token")String token,@Param("date")Integer date) 
	{
	    	
		//service->mybatis->dao
		Response<Article> response=iArticleService.selectArticle(date);
		return response;
		
	}

}
